package de.guice.aktenschrank.messenger;

import com.skype.Skype;

import de.guice.aktenschrank.configuration.Annotation.Trace;

public class SMSImpl implements Messenger {

	private static final String phoneNumber = "+491636801635";
	
	
	Integer counter;
	
	@Override
	@Trace("Send SMS")
	public void sendNotification(Notification notification) throws Throwable {
		if (counter == null)
			counter = 1;
		else
			counter++;
		
		System.out.println("SMS notification Nr "+ counter+": " + notification.getMessage() + " Time: "+notification.getDate().toString());

		Skype.sendSMS(phoneNumber,  notification.getMessage());
		
		
	}

}
